﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
										xmlns:my="clr-namespace:Sakura.Games.StgFramework.Builder.UI">

	<DataTemplate x:Key="ImagItemTemplate">
		<Grid ToolTip="{Binding Path=Description}" Background="Transparent">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="auto" />
				<ColumnDefinition Width="auto" />
			</Grid.ColumnDefinitions>

			<Image Grid.Column="0" Width="16" Height="16" Source="{Binding Path=Image}" VerticalAlignment="Center" Margin="3" />
			<AccessText Grid.Column="1" Margin="3" VerticalAlignment="Center" Text="{Binding Path=Text}" />

		</Grid>
	</DataTemplate>
	
	<!--  对数据对象使用名称和描述提供基本界面 -->
	<DataTemplate x:Key="DataItemTemplate">
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="auto" />
				<RowDefinition Height="auto" />
			</Grid.RowDefinitions>
			
			<TextBlock Grid.Row="0" Margin="3" Text="{Binding Path=Name}" FontWeight="Bold" />
			<TextBlock Grid.Row="1" Margin="3" MaxHeight="50" Text="{Binding Path=Description}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" />
			
		</Grid>
	</DataTemplate>

	<Style TargetType="Button" x:Key="ImageItemButtonStyle">
		<Setter Property="MinWidth" Value="75" />
		<Setter Property="ContentTemplate" Value="{StaticResource ImagItemTemplate}" />
	</Style>
	
</ResourceDictionary>